const mongoose = require('mongoose');
module.exports = new Promise((resolve,reject)=>{
    mongoose.connect("mongodb://localhost:27017/student_info",{useNewUrlParser:true,useUnifiedTopology:true});
    mongoose.connection.once('open',err=>{
       if(!err){
           console.log('服务器启动成功！！');
           resolve();
       }else{
           console.log(err);
           reject(err);
       }
    })
});
// module.exports = promise;